spectrum_periodogram Module



Functions

public pure function cross_periodogram(win, x, y, fs, nfft) result(rst)

Computes the cross-spectral periodogram of two signals.

Arguments

Type IntentOptional Attributes Name
class(window), intent(in) :: win

The window to apply. The size of the window must be non-zero and positive-valued.

real(kind=real64), intent(in) :: x(:)

The first N-element signal to transform.

real(kind=real64), intent(in) :: y(:)

The second N-element signal to transform.

real(kind=real64), intent(in), optional :: fs

An optional input, that if supplied, allows for normalization of the computed spectrum by the frequency resolution.

integer(kind=int32), intent(in), optional :: nfft

An optional input that can be used to force the length of each individual DFT operation by padding any remaining space with zeros. If not supplied, the window size is used to determine the size of the DFT.

Return Value complex(kind=real64), allocatable, (:)

An array containing the discrete cross periodogram estimate. The estimate is returned at discrete frequency intervals that can be determined by a call to frequency_bin_width.

public pure function csd(win, x, y, fs, nfft) result(rst)

Computes the cross spectral density (CSD) of a signal via Welch's method (sometimes referred to as cross power spectral density or CPSD).

Read more…

Arguments

Type IntentOptional Attributes Name
class(window), intent(in) :: win

The window to apply. The size of the window must be non-zero and positive-valued.

real(kind=real64), intent(in) :: x(:)

The first N-element signal to transform.

real(kind=real64), intent(in) :: y(:)

The second N-element signal to transform.

real(kind=real64), intent(in), optional :: fs

An optional input, that if supplied, allows for normalization of the computed spectrum by the frequency resolution.

integer(kind=int32), intent(in), optional :: nfft

An optional input that can be used to force the length of each individual DFT operation by padding any remaining space with zeros. If not supplied, the window size is used to determine the size of the DFT.

Return Value complex(kind=real64), allocatable, (:)

An array containing the discrete CSD estimate. The estimate is returned at discrete frequency intervals that can be determined by a call to frequency_bin_width.

public pure function periodogram(win, x, fs, nfft) result(rst)

Computes the periodogram of a signal.

Arguments

Type IntentOptional Attributes Name
class(window), intent(in) :: win

The window to apply. The size of the window must be non-zero and positive-valued.

real(kind=real64), intent(in) :: x(:)

The signal to transform.

real(kind=real64), intent(in), optional :: fs

An optional input, that if supplied, allows for normalization of the computed spectrum by the frequency resolution.

integer(kind=int32), intent(in), optional :: nfft

An optional input that can be used to force the length of each individual DFT operation by padding any remaining space with zeros. If not supplied, the window size is used to determine the size of the DFT.

Return Value real(kind=real64), allocatable, (:)

An array containing the discrete PSD estimate. The estimate is returned at discrete frequency intervals that can be determined by a call to frequency_bin_width.

public pure function psd(win, x, fs, nfft) result(rst)

Computes the power spectral density (PSD) of a signal via Welch's method.

Read more…

Arguments

Type IntentOptional Attributes Name
class(window), intent(in) :: win

The window to apply. The size of the window must be non-zero and positive-valued.

real(kind=real64), intent(in) :: x(:)

The signal to transform.

real(kind=real64), intent(in), optional :: fs

An optional input, that if supplied, allows for normalization of the computed spectrum by the frequency resolution.

integer(kind=int32), intent(in), optional :: nfft

An optional input that can be used to force the length of each individual DFT operation by padding any remaining space with zeros. If not supplied, the window size is used to determine the size of the DFT.

Return Value real(kind=real64), allocatable, (:)

An array containing the discrete PSD estimate. The estimate is returned at discrete frequency intervals that can be determined by a call to frequency_bin_width.